Skip to content

Conversation

@fourls
Copy link
Collaborator

@fourls fourls commented Jul 24, 2025

Fixes #221.

I considered updating EmptyRoutine and SwallowedException to also ignore all blocks with comments, but I didn't in the end because I decided they had higher-level reasoning than just syntax-level "this block is unnecessary", and so we probably want to forbid those bad patterns regardless of whether there's a comment or not. Happy to hear other views.

@fourls fourls requested a review from cirras July 24, 2025 00:03
Copy link
Collaborator

@cirras cirras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. 👍

@fourls fourls merged commit 964d749 into master Jul 28, 2025
4 checks passed
@fourls fourls deleted the empty-block-exceptions branch July 28, 2025 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more exceptions to the EmptyBlock rule

3 participants